docs(security): port security best practices 1:1 from portal#204
docs(security): port security best practices 1:1 from portal#204
Conversation
Replaces AI-generated security docs with verified portal content, adds 8 missing topic files, 2 new prerequisite pages, and fixes a confirmed double-spend bug in the inter-canister-calls guide. Changes: - Replace: inter-canister-calls.md, access-management.mdx, canister-upgrades.md, dos-prevention.md, data-integrity.md - Add: overview.md, data-storage.md, decentralization.md, https-outcalls.md, misc.md, observability.md, resources.md, formal-verification.md - Add: references/message-execution-properties.md (prerequisite referenced by inter-canister-calls.md) - Add: guides/canister-calls/idempotency.md (prerequisite for safe retry patterns in inter-canister calls) - Fix sidebar order conflicts (now matches portal ordering 1-14) - Fix MDX HTML comment syntax in access-management.mdx - Add security and reference diagram images to public/img/ - encryption.mdx flagged for separate security team review (new content not from portal, not changed here)
Plan for security team reviewHi @dfinity/product-security — we'd like your input on this PR before it merges. Here's the context and what we're asking. What this PR doesThis is a 1:1 port of all security best practices from The only intentional deviations from a pure port are:
You are now added as CODEOWNER for all files in What we're asking from youPlease verify the ported content is correct and matches the portal source. We're keeping this PR in draft intentionally — it will not be merged until after a second cleanup PR (described below) is also approved. What comes next — cleanup PRAfter your approval of this PR, we'll create a second branch from
Merge sequence
|
Summary
inter-canister-calls.md)dfinity/portal(building-apps/security/) 1:1 as the content baseoverview.md,data-storage.md,decentralization.md,https-outcalls.md,miscellaneous.md,observability-and-monitoring.md,formal-verification.mdresources.mdcontent intooverview.mdas a "Further reading" section (no value as a standalone thin page)access-management.mdx→identity-and-access-management.mdxdata-integrity.md→data-integrity-and-authenticity.mdobservability.md→observability-and-monitoring.mdmisc.md→miscellaneous.mdencryption.mdx(AI-generated, unreviewed; vetKeys encryption guide will be written from scratch separately)references/message-execution-properties.mdandguides/canister-calls/idempotency.mdretry_idempotency.pngimage with a PlantUML sequence diagram inidempotency.mdmo:base/HashMapCallerGuard ininter-canister-calls.mdtomo:core/Map(only code change beyond 1:1 port)Notes
@dfinity/agentreferences in the ported files are left as-is; updating to the new JS SDK is a separate follow-upinter-canister-calls.md: it suggested issuing a refund after receiving abounded_waiterror, where the transfer could still have gone throughconcepts/security.md(new architectural overview, not from portal) is kept as-is; flagged for separate security team reviewSync recommendation
sync from dfinity/portal building-apps/security/Tracked in: #203